package com.googlecode.recycled.lang.jse.api.concurrent;

import org.apache.commons.lang.UnhandledException;

import java.util.concurrent.TimeUnit;

/**
 * @author Henryk Konsek
 */
public class Sleepers {

    protected Sleepers() {
    }

    public static void sleep(TimeUnit timeUnit, long amont) {
        try {
            timeUnit.sleep(amont);
        } catch (InterruptedException e) {
            throw new UnhandledException(e);
        }
    }

    public static void sleep(long amount) {
        sleep(TimeUnit.SECONDS, amount);
    }

}
